#ifndef COLORCHOOSE_H
#define COLORCHOOSE_H

#include <QMainWindow>
#include<QColorDialog>
#include<QPushButton>
#include "mainwindow.h"
#include<QWidget>
#include<QVBoxLayout>

class ColorChoose : public QMainWindow
{
    Q_OBJECT
public:
    explicit ColorChoose(QWidget *parent = nullptr);
    ~ColorChoose();
private:
    MainWindow * w;
    QColor * color;
    int totalPlayer = 2;
    int currentchoose = 1;
    QPushButton * confirm;
    QPushButton * Close;
    QPushButton * select;
    QPushButton * back;
    QVBoxLayout * layout;
    bool ifSelect = false;
    // bool ifGet = false;
    // void getColor();
private slots:
    void onConfirmButtonClicked();
    void getTotalPlayer(int TotalPlayer);
    void getMainWindow(MainWindow*);
    void onCloseButtonClicked();
    void onBackButtonClicked();
    void onSelectButtonClicked();
    // void ifConfirm(bool ret);
    // void ifConfirmAct(bool ret);
signals:
    void colorConfirmButtonClicked(bool Default = false);
    // void ifBothConfirm(bool ret = false);
    void chosedColorSiganl(QColor*);
    void closeSignal();
};

#endif // COLORCHOOSE_H
